/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.goods.service;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeesite.common.entity.Page;
import com.jeesite.common.service.CrudService;
import com.jeesite.modules.file.utils.FileUploadUtils;
import com.jeesite.modules.goods.dao.ZtOrderDao;
import com.jeesite.modules.goods.entity.ZtGoods;
import com.jeesite.modules.goods.entity.ZtOrder;

/**
 * 测试数据Service
 * 
 * @author ThinkGem
 * @version 2018-04-22
 */
@Service
@Transactional(readOnly = true)
public class ZtOrderService extends CrudService<ZtOrderDao, ZtOrder> {

	/**
	 * 获取单条数据
	 * 
	 * @param testData
	 * @return
	 */
	@Override
	public ZtOrder get(ZtOrder ztOrder) {
		ZtOrder entity = super.get(ztOrder);
		if (entity == null) {
			entity = new ZtOrder();
		}
		return entity;
	}

	public ZtOrder getByOrder(ZtOrder ztOrder) {
		return dao.getByOrder(ztOrder);
	}
	
	public ZtOrder getOrder(ZtOrder ztOrder) {
		return dao.getOrder(ztOrder);
	}
	
	
	public List<ZtOrder> findMh(ZtOrder ztOrder) {
		return dao.findMh(ztOrder);
	}
	
	public List<ZtOrder> getAllOrder(ZtOrder ztOrder) {
		return dao.getAllOrder(ztOrder);
	}
	
	
	public List<ZtOrder> findwc(ZtOrder ztOrder) {
		return dao.findwc(ztOrder);
	}
	public List<ZtOrder> findAllOrder(ZtOrder ztOrder) {
		return dao.findAllOrder(ztOrder);
	}
	public Integer getNum(ZtOrder ztOrder) {
		return dao.getNum(ztOrder);
	}
	
	
	
	public List<ZtOrder> findGhMh(ZtOrder ztOrder) {
		return dao.findGhMh(ztOrder);
	}
	
	
	public List<ZtOrder> findListByNew(ZtOrder ztOrder) {
		return dao.findListByNew(ztOrder);
	}

	/**
	 * 查询分页数据
	 * 
	 * @param page
	 *            分页对象
	 * @param testData
	 * @return
	 */
	@Override
	public Page<ZtOrder> findPage(Page<ZtOrder> page, ZtOrder ztOrder) {
		return super.findPage(page, ztOrder);
	}

	/**
	 * 保存数据（插入或更新）
	 * 
	 * @param testData
	 */
	@Override
	@Transactional(readOnly = false)
	public void save(ZtOrder ztOrder) {
		super.save(ztOrder);
	}
	
	@Transactional(readOnly = false)
	public void updateAddr(ZtOrder ztOrder) {
		dao.updateAddr(ztOrder);
	}
	
	/**
	 * 更新状态
	 * 
	 * @param testData
	 */
	@Override
	@Transactional(readOnly = false)
	public void updateStatus(ZtOrder ztOrder) {
		super.updateStatus(ztOrder);
	}
	
	@Transactional(readOnly = false)
	public void updateOrderstatusByOrder(ZtOrder ztOrder) {
		dao.updateOrderstatusByOrder(ztOrder);
	}
	
	/**
	 * 删除数据
	 * 
	 * @param testData
	 */
	@Override
	@Transactional(readOnly = false)
	public void delete(ZtOrder ztOrder) {
		super.delete(ztOrder);
	}
	
	@Transactional(readOnly = false)
	public void baseUpdateOrderstatus(List<ZtOrder> list) {
		dao.baseUpdateOrderstatus(list);
	}
	@Transactional(readOnly = false)
	public void updateOrderstatusOuttime(ZtOrder ztOrder) {
		dao.updateOrderstatusOuttime(ztOrder);
	}
	
	@Transactional(readOnly = false)
	public void updateOrderstatus(ZtOrder ztOrder) {
		dao.updateOrderstatus(ztOrder);
	}


	public ZtOrder findByOrder(ZtOrder ztOrder) {
		return dao.findByOrder(ztOrder);
	}
}